import QtQuick 1.0

Rectangle {
    property alias  title_text: title.text
    property alias  title_icon: logo.source
    property alias  settings_visible: settingsIcon.visible

    signal settingsActive

    id: titleBar
    width: parent.width
    height: 80
    color: "#00000000"

    Image {
        source: "../images/backgrounds/titlebar_bkg_360x80.png"
        fillMode: Image.Stretch
        smooth: true
    }

    Image {
        id: logo
        anchors.verticalCenter: parent.verticalCenter
        anchors.left: parent.left
        anchors.leftMargin: 10
    }

    Text {
        id: title
        font.family: nokiaStandard.name
        font.pixelSize: 32
        elide: Text.ElideRight
        color: "#FFFFFF"
        style: Text.Raised
        styleColor: "#444549"
        anchors.verticalCenter: parent.verticalCenter
        anchors.left: parent.left
        anchors.leftMargin: 20 + logo.width
        anchors.right: parent.right
        anchors.rightMargin: 70
    }

    Image {
        id: settingsIcon
        anchors.verticalCenter: parent.verticalCenter
        anchors.right: parent.right
        anchors.rightMargin: 15
        source: "../images/icon_settings.png"
        visible: false

        MouseArea {
            anchors.fill: parent

            onReleased: {
                titleBar.settingsActive();
            }
        }
    }


}
